const commentControllers = require('../../controller/system/comment');


exports.delete = (req, res) => {
    commentControllers.deleteComment(req.body, e => {
        res.status(200).json(e);
    })
}

exports.search = (req, res) => {
    let params = req.body;
    let paramsJson = {
        startTime: params.startTime ? params.startTime : null,
        endTime: params.endTime ? params.endTime : null,
        pageSize: params.pageSize ? Number(params.pageSize) : 20,
        pageNum: params.pageNum ? Number(params.pageNum) : 1
    }
    commentControllers.searchComment(paramsJson, e => {
        res.status(200).json(e);
    })
}